﻿using System.ComponentModel;
using System.Windows.Media;

namespace Gmantis.Controls.Toolbar
{
    public class ToolbarCommand : Command, INotifyPropertyChanged
    {
        // Fields
        private string _labelTitle;
        private ImageSource _largeImage;
        private ImageSource _smallImage;

        // Events
        public event PropertyChangedEventHandler PropertyChanged;

        // Methods
        private void NotifyPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        // Properties
        public string LabelTitle
        {
            get
            {
                return this._labelTitle;
            }
            set
            {
                if (this._labelTitle != value)
                {
                    this._labelTitle = value;
                    this.NotifyPropertyChanged("LabelTitle");
                }
            }
        }

        public ImageSource LargeImageSource
        {
            get
            {
                return this._largeImage;
            }
            set
            {
                if (this._largeImage != value)
                {
                    this._largeImage = value;
                    this.NotifyPropertyChanged("LargeImageSource");
                }
            }
        }

        public ImageSource SmallImageSource
        {
            get
            {
                return this._smallImage;
            }
            set
            {
                if (this._smallImage != value)
                {
                    this._smallImage = value;
                    this.NotifyPropertyChanged("SmallImageSource");
                }
            }
        }
    }
}
